package com.chainshop.income.service.impl;

import java.util.List;

import com.chainshop.common.core.domain.pojo.RevenueRecords;
import com.chainshop.income.mapper.RevenueRecordsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chainshop.income.service.IRevenueRecordsService;

/**
 * 收入查询Service业务层处理
 * 
 * @author hmy
 * @date 2024-08-15
 */
@Service
public class RevenueRecordsServiceImpl implements IRevenueRecordsService 
{
    @Autowired
    private RevenueRecordsMapper revenueRecordsMapper;

    /**
     * 查询收入查询
     * 
     * @param id 收入查询主键
     * @return 收入查询
     */
    @Override
    public RevenueRecords selectRevenueRecordsById(Long id)
    {
        RevenueRecords revenueRecords = revenueRecordsMapper.selectRevenueRecordsById(id);
        System.out.println(revenueRecords);
        return revenueRecords;
    }

    /**
     * 查询收入查询列表
     * 
     * @param revenueRecords 收入查询
     * @return 收入查询
     */
    @Override
    public List<RevenueRecords> selectRevenueRecordsList(RevenueRecords revenueRecords)
    {
        return revenueRecordsMapper.selectRevenueRecordsList(revenueRecords);
    }

    /**
     * 新增收入查询
     * 
     * @param revenueRecords 收入查询
     * @return 结果
     */
    @Override
    public int insertRevenueRecords(RevenueRecords revenueRecords)
    {
        return revenueRecordsMapper.insertRevenueRecords(revenueRecords);
    }

    /**
     * 修改收入查询
     * 
     * @param revenueRecords 收入查询
     * @return 结果
     */
    @Override
    public int updateRevenueRecords(RevenueRecords revenueRecords)
    {
        return revenueRecordsMapper.updateRevenueRecords(revenueRecords);
    }

    /**
     * 批量删除收入查询
     * 
     * @param ids 需要删除的收入查询主键
     * @return 结果
     */
    @Override
    public int deleteRevenueRecordsByIds(Long[] ids)
    {
        return revenueRecordsMapper.deleteRevenueRecordsByIds(ids);
    }

    /**
     * 删除收入查询信息
     * 
     * @param id 收入查询主键
     * @return 结果
     */
    @Override
    public int deleteRevenueRecordsById(Long id)
    {
        return revenueRecordsMapper.deleteRevenueRecordsById(id);
    }
}
